import logging
import yagmail

def log_set():
    logging.basicConfig(level=logging.DEBUG,format='%(levelno)s_%(asctime)s_%(message)s',handlers=[
        logging.StreamHandler(),
        logging.FileHandler('log.txt')
    ])

def send_mail(a):
    mail=yagmail.SMTP(user='3611308117@qq.com',password='cyhisylviitnchii',host='smtp.qq.com')
    mail.send(to='3611308117@qq.com',subject='测试报告主标题',contents='测试内容',attachments=a)